package com.github.base.dto.user;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @description: 用户添加DTO
 * @author: dongdong.wen
 * @date:  2021/1/28 11:00 早上
 **/

@Data
public class UserAddDTO {

    @NotBlank(message = "账号不能为空")
    @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String username;

    @NotBlank(message = "密码不能为空")
    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String password;

    @NotBlank(message = "姓名不能为空")
    @Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
    private String name;

    @NotNull(message = "启用状态不能为空")
    @Schema(description = "启用状态 1-启用 0-禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer usable;

    @Schema(description = "角色ids")
    private List<Long> roleIdList;

    @NotNull(message = "所属机构id不能为空")
    @Schema(description = "所属机构id不能为空", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long deptId;
}
